package com.czjtxy.extraTerm.server;

import com.czjtxy.extraTerm.entity.DO.Tuser;

import java.sql.SQLException;
import java.util.List;

/**
 * @program: staff-house
 * @author: MingYi
 * @create: 2021/06/30 08:11
 */
public interface UserService {
    /**
     * 登录功能
     *
     * @param loginName
     * @param pwd
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Tuser login(String loginName, String pwd) throws SQLException, ClassNotFoundException;

    /**
     * 显示功能
     *
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    List<Tuser> getAll() throws SQLException, ClassNotFoundException;

    List<Tuser> getPart(Tuser tuser) throws SQLException, ClassNotFoundException;

    /**
     * 回显功能
     *
     * @param uid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    Tuser getOne(int uid) throws SQLException, ClassNotFoundException;

    /**
     * 修改用户部分信息
     *
     * @param tuser
     */
    void updateUser(Tuser tuser) throws SQLException;

    /**
     * 删除所选用户
     *
     * @param ids
     */
    void deleteUser(String ids) throws SQLException;

    /**
     * 添加用户
     *
     * @param tuser
     */
    void addUser(Tuser tuser) throws SQLException;
}
